package indi.cloud.common.elasticsearch.core;

import indi.cloud.common.elasticsearch.core.esmethod.EsEquals;
import indi.cloud.common.elasticsearch.core.esmethod.EsIn;
import indi.cloud.common.elasticsearch.core.esmethod.EsLike;
import indi.cloud.common.elasticsearch.core.esmethod.EsRange;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.data.elasticsearch.annotations.Document;

import java.util.List;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Document(indexName = "ems")
public class EsDocBeanReq extends EsBaseReq {
    @EsEquals(name = "_id")
    private String id;

    @EsEquals
    private String firstCode;

    @EsEquals
    private String secordCode;

    @EsLike
    private String content;

    @EsIn(name = "type")
    private List<Integer> typeList;

    @EsRange(lt = true, name = "type")
    private Integer typeRange;
}
